package com.ren.mianshi.http;

import retrofit2.Call;
import retrofit2.Response;

/**
 * 网络请求声明周期
 * Author: renheng
 * Time: 2019/5/27
 */

public interface IRResponse<T> {


    /**
     * 响应成功
     */
    void onSuccess(Call<T> call, T t);


    /**
     * 处理进行中
     *
     * @param call
     * @param response
     */
    void onProcess(Call<T> call, Response<T> response);

    /**
     * 响应失败
     *
     * @param call
     * @param state
     * @param msg
     */
    void onFail(Call<T> call, int state, String msg);

    /**
     * 响应结束
     */
    void onComplete();

}
